include agg/Makefile.in.$(shell uname)

AGG=agg/src/ctrl/agg_slider_ctrl.o

REP_SRC_AGG = agg/src/
REP_PLF_AGG = agg/src/platform/X11/

PLATFORMSOURCES=agg/src/platform/X11/agg_platform_support.o

PLF_AGG=$(REP_PLF_AGG)agg_platform_support.o

CXXFLAGS= $(AGGCXXFLAGS) -Iagg/include \
-Lagg/src \
$(PIXFMT)

CXXFREETYPEFLAGS= $(AGGCXXFLAGS) -Wall \
-Iagg/include \
-Iagg/font_freetype \
-I/usr/local/include/freetype2 \
-Lagg/src \
$(PIXFMT)

LIBS = $(AGGLIBS) -lm -lX11

SRC_AGG= argslib.cpp \
$(REP_SRC_AGG)agg_trans_affine.cpp \
$(REP_SRC_AGG)agg_arc.cpp \
$(REP_SRC_AGG)agg_bezier_arc.cpp \
$(REP_SRC_AGG)agg_curves.cpp \
$(REP_SRC_AGG)agg_embedded_raster_fonts.cpp \
$(REP_SRC_AGG)agg_gsv_text.cpp \
$(REP_SRC_AGG)agg_rounded_rect.cpp \
$(REP_SRC_AGG)ctrl/agg_slider_ctrl.cpp \
$(REP_SRC_AGG)agg_sqrt_tables.cpp \
$(REP_SRC_AGG)agg_vcgen_stroke.cpp
OBJ= $(SRC_AGG:.cpp=.o)

all: graph

%.o:	%.cpp %.h
#	g++ -Lagg/src -Iagg/include -o $@ -c $<
	@echo \< $*.cpp \>
	$(CXX) -c $(CXXFLAGS) $*.cpp -o $@

base:
	cd agg/src/; make


graph.o: graph.cpp
	$(CXX) -c $(CXXFLAGS) $*.cpp -o $@
g: graph.o $(PLF_AGG) $(OBJ)
	g++ -Lagg/src -Iagg/include -o $@ $^ -lpthread -lm -lX11

graph: main.o CApp.o CNode.o CNetwork.o CCommand.o CConsole.o argslib.o $(PLF_AGG) $(OBJ)
	g++ -L/usr/X11R6/lib -Lagg/src -Iagg/include -o $@ $^ -lpthread -lm -lX11

clean:
	rm *.o graph


	




